﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GrainManage.Entities.Price;
using GrainManage.Proxy.Util;
using System.Reflection;

namespace GrainManage.Proxy
{
    public sealed class PriceProxy : GrainManage.Interface.IPrice
    {

        //************************************************POST************************************************
        public OutputGetGrainType GetGrainType(InputGetGrainType input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetGrainType>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetPriceType GetPriceType(InputGetPriceType input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetPriceType>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetPrice GetPrice(InputGetPrice input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetPrice>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetRecentPrice GetRecentPrice(InputGetRecentPrice input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetRecentPrice>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputInsert Insert(InputInsert input)
        {
            var result = WebUtil.ExecuteByPost<OutputInsert>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputUpdate Update(InputUpdate input)
        {
            var result = WebUtil.ExecuteByPost<OutputUpdate>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputDelete Delete(InputDelete input)
        {
            var result = WebUtil.ExecuteByPost<OutputDelete>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchInsert BatchInsert(InputBatchInsert input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchInsert>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchUpdate BatchUpdate(InputBatchUpdate input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchUpdate>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchDelete BatchDelete(InputBatchDelete input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchDelete>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }
    }
}
